﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <string.h>
using namespace std;

class Solution {
public:
    int findDuplicate(vector<int>& nums) {
        int slow = 0, fast = 0;
        do
        {
            slow = nums[slow];
            fast = nums[nums[fast]];
        } while (nums[slow] != nums[fast]);
        slow = 0;
        while (nums[slow] != nums[fast])
        {
            slow = nums[slow];
            fast = nums[fast];
        }
        return nums[slow];
    }
};

int main()
{
    queue<int> qt;
    queue<int>& out = qt;
    cout << out.size();
    return 0;
}